Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Implement terraform bootstrap stage #65

Conversation

smokestacklightnin
Copy link
Contributor

@smokestacklightnin smokestacklightnin commented Sep 22, 2024

This is still a work in progress.

This PR implements a bootstrap stage to create state resources discussed in Issue #60.

This PR includes:

  • Refactoring existing related terraform code
  • Move bootstrap terraform module to its own directories
  • Add staging and production modules for state resources bootstrap stage

Important: The IAM policy logic will need to be uncommented before this PR is merged.

@smokestacklightnin smokestacklightnin marked this pull request as draft September 22, 2024 04:52
web/deploy/terraform/modules/shared_resources/outputs.tf Outdated Show resolved Hide resolved
web/deploy/terraform/modules/shared_resources/variables.tf Outdated Show resolved Hide resolved
web/deploy/terraform/modules/shared_resources/variables.tf Outdated Show resolved Hide resolved
Comment on lines 15 to 27
module "shared_resources" {
source = "../modules/shared_resources"
source = "../modules/shared_resources"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We won't be calling this module from each environment because otherwise we'll end up with duplicate resources. You'll want to extract this call to its own file that we run only once

@smokestacklightnin smokestacklightnin force-pushed the infra/bootstrap-state-storage branch from 1ecf003 to 8a8db15 Compare September 23, 2024 21:45
@smokestacklightnin smokestacklightnin force-pushed the infra/bootstrap-state-storage branch from 8a8db15 to 70021ad Compare September 23, 2024 21:48
@smokestacklightnin smokestacklightnin force-pushed the infra/bootstrap-state-storage branch from 70021ad to 6ed16ca Compare September 23, 2024 22:06
@smokestacklightnin smokestacklightnin force-pushed the infra/bootstrap-state-storage branch from b4678c1 to 31dd6a0 Compare September 24, 2024 05:25
@smokestacklightnin smokestacklightnin changed the title [WIP] Implement terraform state storage bootstrap stage [WIP] Implement terraform bootstrap stage Sep 24, 2024
@smokestacklightnin smokestacklightnin force-pushed the infra/bootstrap-state-storage branch from 73f5155 to bf7263f Compare September 26, 2024 05:07
Copy link
Contributor

@marcelovilla marcelovilla left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smokestacklightnin we still need to define the S3 backend created on the state stage inside the shared and staging folders. You can adapt the existing terraform backend block or move it to its own backend.tf file

}

module "stage_state" {
source = "./modules/"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'd usually specify the module name, but it would need to be inside a subfolder. Do you think it would make sense to move those files to their own subfolder and then specify its name here?

@leej3
Copy link
Collaborator

leej3 commented Oct 25, 2024

superceded by #67

@leej3 leej3 closed this Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants